package com.example.demo.judge.entity;

import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;


/**
 * 详情：https://ce.judge0.com/
 */
@Data
@ToString
public class SubmissionVO implements Serializable {

    /**
     * Program’s source code.
     * <p>
     * No default. This attribute is required for single-file programs.
     */
    public String source_code;
    /**
     * Language ID.
     * <p>
     * No default. This attribute is required.
     */
    public Integer language_id;
    /**
     * Options for the compiler (i.e. compiler flags).
     * <p>
     * null
     */
    public String compiler_options;
    /**
     * Command line arguments for the program.
     * <p>
     * null
     */
    public String command_line_arguments;
    /**
     * Input for program.
     * <p>
     * null. Program won’t receive anything to standard input.
     */
    public String stdin;
    /**
     * Input for program.
     * <p>
     * null. Program’s stdout won’t be compared with expected_output.
     */
    public String expected_output;
    /**
     * Default runtime limit for every program. Time in which the OS assigns the processor to different tasks is not counted.
     * <p>
     * Depends on configuration.
     */
    public Float cpu_time_limit;
    /**
     * When a time limit is exceeded, wait for extra time, before killing the program. This has the advantage that the real execution time is reported, even though it slightly exceeds the limit.
     * <p>
     * Depends on configuration.
     */
    public Float cpu_extra_time;
    /**
     * Limit wall-clock time in seconds. Decimal numbers are allowed. This clock measures the time from the start of the program to its exit, so it does not stop when the program has lost the CPU or when it is waiting for an external event. We recommend to use cpu_time_limit as the main limit, but set wall_time_limit to a much higher value as a precaution against sleeping programs
     * <p>
     * Depends on configuration.
     */
    public Float wall_time_limit;
    /**
     * Limit address space of the program. Unit:kilobyte
     * <p>
     * Depends on configuration.
     */
    public Float memory_limit;
    /**
     * Limit process stack. Unit:kilobyte
     * <p>
     * Depends on configuration.
     */
    public Integer stack_limit;
    /**
     * Maximum number of processes and/or threads program can create.
     * <p>
     * Depends on configuration.
     */
    public Integer max_processes_and_or_threads;
    /**
     * If true then cpu_time_limit will be used as per process and thread.
     * <p>
     * Depends on configuration.
     */
    public Boolean enable_per_process_and_thread_time_limit;
    /**
     * If true then memory_limit will be used as per process and thread.
     * <p>
     * Depends on configuration.
     */
    public Boolean enable_per_process_and_thread_memory_limit;
    /**
     * Limit file size created or modified by the program. Unit:Depends on configuration.
     * <p>
     * Depends on configuration.
     */
    public Integer max_file_size;
    /**
     * If true standard error will be redirected to standard output.
     * <p>
     * Depends on configuration.
     */
    public Boolean redirect_stderr_to_stdout;
    /**
     * If true program will have network access.
     * <p>
     * Depends on configuration.
     */
    public Boolean enable_network;
    /**
     * Run each program number_of_runs times and take average of time and memory.
     * <p>
     * Depends on configuration.
     */
    public Integer number_of_runs;
    /**
     * Additional files that should be available alongside the source code. Value of this string should represent the content of a .zip that contains additional files. This attribute is required for multi-file programs.
     * <p>
     * null
     * <p>
     * !!!!Base64 Encoded String Required!!!!
     */
    public String additional_files;
    /**
     * URL on which Judge0 will issue PUT request with the submission in a request body after submission has been done.
     * <p>
     * null
     */
    public String callback_url;
    /**
     * Standard output of the program after execution.
     */
    public String stdout;
    /**
     * Standard error of the program after execution.
     */
    public String stderr;
    /**
     * Compiler output after compilation.
     */
    public String compile_output;
    /**
     * If submission status is Internal Error then this message comes from Judge0 itself, otherwise this is status message from isolate.
     */
    public String message;
    /**
     * The program’s exit code.
     */
    public Integer exit_code;
    /**
     * Signal code that the program recieved before exiting.
     */
    public String exit_signal;
    /**
     * Submission status.
     */
    public Status status;
    /**
     * Date and time when submission was created.
     */
    public Date created_at;
    /**
     * Date and time when submission was processed.
     * <p>
     * null if submission is still in queue or if submission is processing.
     */
    public Date finished_at;
    /**
     * Unique submission token which can be used to get a specific submission.
     */
    public String token;
    /**
     * Program’s run time. Unit:second
     */
    public Float time;
    /**
     * Program’s wall time. Will be greater or equal to time. Unit:second
     */
    public Float wall_time;
    /**
     * Memory used by the program after execution. Unit:kilobyte
     */
    public Float memory;

    public Integer Qid;
}